package com.ruoyi.system.domain.bo;

import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import java.util.Date;

import java.math.BigDecimal;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 商品属性值业务对象 p_store_product_attr_value
 *
 * @author ruoyi
 * @date 2022-08-01
 */

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel("商品属性值业务对象")
public class PStoreProductAttrValueBo extends BaseEntity {

    /**
     * 主键
     */
    @ApiModelProperty(value = "主键", required = true)
    @NotNull(message = "主键不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 商品ID
     */
    @ApiModelProperty(value = "商品ID", required = true)
    @NotNull(message = "商品ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long productId;

    /**
     * 商品属性索引值 (attr_value|attr_value[|....])
     */
    @ApiModelProperty(value = "商品属性索引值 (attr_value|attr_value[|....])", required = true)
    @NotBlank(message = "商品属性索引值 (attr_value|attr_value[|....])不能为空", groups = { AddGroup.class, EditGroup.class })
    private String sku;

    /**
     * 属性对应的库存
     */
    @ApiModelProperty(value = "属性对应的库存", required = true)
    @NotNull(message = "属性对应的库存不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer stock;

    /**
     * 销量
     */
    @ApiModelProperty(value = "销量", required = true)
    @NotNull(message = "销量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer sales;

    /**
     * 属性金额
     */
    @ApiModelProperty(value = "属性金额", required = true)
    @NotNull(message = "属性金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal price;

    /**
     * 图片
     */
    @ApiModelProperty(value = "图片", required = true)
    @NotBlank(message = "图片不能为空", groups = { AddGroup.class, EditGroup.class })
    private String image;

    /**
     * 唯一值
     */
    @ApiModelProperty(value = "唯一值", required = true)
    @NotBlank(message = "唯一值不能为空", groups = { AddGroup.class, EditGroup.class })
    private String unique;

    /**
     * 成本价
     */
    @ApiModelProperty(value = "成本价", required = true)
    @NotNull(message = "成本价不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal cost;

    /**
     * 商品条码
     */
    @ApiModelProperty(value = "商品条码", required = true)
    @NotBlank(message = "商品条码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String barCode;

    /**
     * 原价
     */
    @ApiModelProperty(value = "原价", required = true)
    @NotNull(message = "原价不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal otPrice;

    /**
     * 重量
     */
    @ApiModelProperty(value = "重量", required = true)
    @NotNull(message = "重量不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal weight;

    /**
     * 体积
     */
    @ApiModelProperty(value = "体积", required = true)
    @NotNull(message = "体积不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal volume;

    /**
     * 一级返佣
     */
    @ApiModelProperty(value = "一级返佣", required = true)
    @NotNull(message = "一级返佣不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal brokerage;

    /**
     * 二级返佣
     */
    @ApiModelProperty(value = "二级返佣", required = true)
    @NotNull(message = "二级返佣不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal brokerageTwo;

    /**
     * 活动类型 0=商品，1=秒杀，2=砍价，3=拼团
     */
    @ApiModelProperty(value = "活动类型 0=商品，1=秒杀，2=砍价，3=拼团", required = true)
    @NotNull(message = "活动类型 0=商品，1=秒杀，2=砍价，3=拼团不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer type;

    /**
     * 活动限购数量
     */
    @ApiModelProperty(value = "活动限购数量", required = true)
    @NotNull(message = "活动限购数量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long quota;

    /**
     * 活动限购数量显示
     */
    @ApiModelProperty(value = "活动限购数量显示", required = true)
    @NotNull(message = "活动限购数量显示不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long quotaShow;

    /**
     * attr_values 创建更新时的属性对应
     */
    @ApiModelProperty(value = "attr_values 创建更新时的属性对应", required = true)
    @NotBlank(message = "attr_values 创建更新时的属性对应不能为空", groups = { AddGroup.class, EditGroup.class })
    private String attrValue;
}
